<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .class1{
            border:1px black solid;
            width: 210px;
            overflow: hidden;
        }
        .class1>div{
            height: 50px;
            width: 50px;
            background-color: gold;
            float: left;
            margin: 10px;
        }
    </style>
</head>
<body>
    <div class="class1">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
        <div>7</div>
        <div>8</div>
    </div>
</body>
</html>